clear, close, clc

x = ones(500,1);
y = fft(x);

N = length(x);
w = exp(-i*2*pi/N);



[I,J] = meshgrid(1:N,1:N);
DFT = w.^((I-1).*(J-1));
imagesc((real(DFT)))